package zoodemo;
//饲养员类
    public class Feeder {
        private String name;

        public Feeder(String name) {
            this.name = name;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
        public void feed(Food food,Animal animal){
            animal.eat(food);
            animal.shout();
        }

        /*public void feed(Food food, Cat cat){
            cat.eat(food);
            cat.shout();
        }
        public void feed(Food food,Dog dog){
            dog.eat(food);
            dog.shout();
        }*/
        public void say(){
            System.out.println("欢迎大家来到动物园,/n大家好,我是饲养员"+this.name);
        }

    }


